import lib.problem as problem

class Problem002(problem.Problem):
	def __init__(self):
		problem.Problem.__init__(self, 2)
		
	def solve(self):
		fibo1 = 1
		fibo2 = 1
		
		found = False
		sum = 0
		
		while not found:
			fibo = fibo1
			fibo += fibo2
			
			if fibo > 4000000:
				return sum
				break
			
			if fibo % 2 == 0:
				sum += fibo
			
			fibo1 = fibo2
			fibo2 = fibo


if __name__ == "__main__":
	print(Problem002().solveAndTime())